Skip to main content
GET
/
api
/
usuarios
List Users
curl --request GET \
  --url https://api.example.com/api/usuarios
{
  "200": {},
  "401": {},
  "403": {},
  "users": [
    {
      "usuario_id": 123,
      "username": "<string>",
      "email": {},
      "nombre": "<string>",
      "apellidos": "<string>",
      "rol": {},
      "direccion_envio": "<string>",
      "fecha_nacimiento": "<string>",
      "activo": true
    }
  ]
}

Authentication

Required: Admin only This endpoint requires administrator privileges. Include a valid JWT token in the Authorization header.

Request

No parameters required.
curl -X GET https://api.iquea.com/api/usuarios \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Returns an array of user objects.
users
array
Array of user objects

Example Response

[
  {
    "usuario_id": 1,
    "username": "johndoe",
    "email": {
      "value": "john@example.com"
    },
    "nombre": "John",
    "apellidos": "Doe Smith",
    "rol": "CLIENTE",
    "direccion_envio": "123 Main St, Madrid, Spain",
    "fecha_nacimiento": "1990-05-15",
    "activo": true
  },
  {
    "usuario_id": 2,
    "username": "admin",
    "email": {
      "value": "admin@iquea.com"
    },
    "nombre": "Admin",
    "apellidos": "User",
    "rol": "ADMIN",
    "direccion_envio": "456 Admin Blvd, Barcelona, Spain",
    "fecha_nacimiento": "1985-03-20",
    "activo": true
  }
]

Status Codes

200
OK
Successfully retrieved list of users
401
Unauthorized
Missing or invalid authentication token
403
Forbidden
User does not have admin privileges

Security Notes

Password Protection: User passwords are never included in API responses. The password field is stored securely in the database but excluded from all DTO responses.
This endpoint returns all users in the system. For privacy and security reasons, ensure this endpoint is restricted to administrators only.